Using an Action Script Genie in the Xbasic Editor

Description

Just because you are in the Xbasic Code Editor does not mean you cannot take advantage of the Action Script Genies. This example shows how to use the Action Script Editor to generate code to paste into an Xbasic script.

Some of the examples in this guide require the "Learning Action Scripting" workspace. See Creating Your First Action Script to learn how to get the "Learning Action Scripting" workspace installed.

  1. Put the insertion point at the end of the script by clicking in the script and pressing CTRL-END.

  2. Press Enter twice to move to a new line.

  3. Click the Xbasic Script Genie button on the toolbar.

  4. The familiar Select Action dialog appears. Select the "Control Panel" category and the "Control Panel Maximize" action.

  5. Click OK. Alpha Anywhere displays the Xbasic code associated with this action.

    images/converting_8.gif
  6. To insert this code into the script you are editing click the Insert Code in Script Editor button. Alpha Anywhere pastes the code into the script editor at the insertion point. The end of the script now looks like this:

    images/converting_9.gif
  7. Click the Xbasic Script Genie button again.

  8. Select the "Form/Browse" category and the "Open Default Form or Browse Action".

  9. Click OK.

  10. Select the "customers" table.

  11. Click Next >.

    images/converting_11.gif
  12. The next page of the Genie appears. Here you can specify selection and sort criteria for the form you are opening. Select the "Order criteria, no additional Filter criteria" option (as we want to show all records, sorted by lastname ).

  13. Enter lastname at the Order Expression prompt.

  14. Click Finish to complete the Action.

    images/converting_12.gif
  15. Alpha Anywhere shows the Xbasic code corresponding to the action. Click the Insert Code in Script Editor button.

    images/converting_13.gif
  16. Alpha Anywhere now inserts this code into the current script. The end of the script now looks like this:

    images/converting_14.gif

As you can see, the Genies used to define Actions in an Action Script are just as useful for Xbasic programmers. Even a seasoned Xbasic programmer can save a lot of time starting out with lines of error-free, well-commented code.

Limitations

Desktop Applications Only